#include <stdio.h>
int main()
{
    int a[1000],n,i,j;
    while (scanf("%d",&n)!=EOF)
    {
        if(n==0)printf("0");
        for (i=0;n!=0;i++)
        {
            a[i]=n%2;
            n/=2;
        }
        for (j=i-1;j>=0;j--)printf("%d",a[j]);
        printf("\n");
    }
    return 0;
}
